package lanqiao._01基础练习;

import java.util.Scanner;

/**
 * @author 挚爱之夕
 * @version 1.0
 * @implSpec lanqiao._基础练习
 * @since 2022 - 10 - 26 - 23:50
 */
public class _05十进制转十六进制 {
}
class Main5{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int num = sc.nextInt();
        StringBuilder sb = new StringBuilder();
        while(num != 0){
            int remainder = num % 16;
            if(remainder < 10){
                sb.insert(0, remainder);
            }else{
                sb.insert(0, (char)(remainder - 10 + 'A'));
            }
            num /= 16;
        }
        System.out.println(sb.toString());
    }
}